MutableSortedMap

A mutable variant of SortedMap that supports insertion and removal of entries while maintaining sorted key order.

Type Parameters

K

The type of keys maintained by this map.

V

The type of mapped values.

See also

Inheritors

Properties

Link copied to clipboard
Link copied to clipboard
abstract val keys: MutableSet<K>
Link copied to clipboard
expect abstract val size: Int
Link copied to clipboard
abstract val values: MutableCollection<V>

Functions

Link copied to clipboard
abstract fun ceiling(key: K): K?

Returns the least key greater than or equal to the given key, or null if there is no such key.

Link copied to clipboard
expect abstract fun clear()
Link copied to clipboard
abstract fun containsKey(key: K): Boolean
Link copied to clipboard
abstract fun containsValue(value: V): Boolean
Link copied to clipboard
abstract fun firstKey(): K?

Returns the least key in this map, or null if the map is empty.

Link copied to clipboard
abstract fun floor(key: K): K?

Returns the greatest key less than or equal to the given key, or null if there is no such key.

Link copied to clipboard
abstract operator fun get(key: K): V?
Link copied to clipboard
abstract fun higher(key: K): K?

Returns the least key strictly greater than the given key, or null if there is no such key.

Link copied to clipboard
expect abstract fun isEmpty(): Boolean
Link copied to clipboard
abstract fun lastKey(): K?

Returns the greatest key in this map, or null if the map is empty.

Link copied to clipboard
abstract fun lower(key: K): K?

Returns the greatest key strictly less than the given key, or null if there is no such key.

Link copied to clipboard
abstract fun put(key: K, value: V): V?
Link copied to clipboard
abstract fun putAll(from: Map<out K, V>)
Link copied to clipboard
abstract fun remove(key: K): V?